package service.factory;

import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;

import service.impl.MixedLibraryServiceImpl;

public class MixedBookFactory implements ServiceFactory {

	public Object getService(Bundle bundle, ServiceRegistration serviceReg) {
		System.out.println("MIXED_BOOK_FACTORY: getService()" + " for bundle= "
				+ bundle.getLocation());

		System.out.println("MIXED_BOOK_FACTORY: getService()" + " for ServiceReg= "
				+ serviceReg);
		
		return new MixedLibraryServiceImpl();
	}

	public void ungetService(Bundle bundle, ServiceRegistration serviceReg,
			Object service) {
		System.out.println("MIXED_BOOK_FACTORY: ungetService()" + " for bundle= "
				+ bundle.getLocation());

		System.out.println("MIXED_BOOK_FACTORY: ungetService()" + " for ServiceReg= "
				+ serviceReg);
		
		System.out.println("MIXED_BOOK_FACTORY: ungetService()" + " for Service= "
				+ service);

	}

}
